package next.CommonProfile;

import android.location.Location;
import android.location.LocationManager;
import android.location.LocationProvider;
import android.os.Bundle;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

import com.google.android.maps.GeoPoint;

import next.CustomLayout.TitleBar;
import next.Functionality.S_3R4_Activity;
import next.TemplateActivity.R;
import next.control.ApplicationController;

public class PersonalInfo extends S_3R4_Activity{

	private TextView name, realName,pass, repeatPass,email, cellphone, ML, LN, address, phone;
	private ImageView TypeUserSI;
	private Bundle b;
	private LocationManager locationManager;
	private LocationProvider locationProvider;
	private GeoPoint lastKnownPoint = null;
	private Location lastKnownLocation = null;
	private Button save;
	private int value=0;
	private String location="";
	
	/***/
	@Override
	 public void onCreate(Bundle savedInstanceState) {
	        super.onCreate(savedInstanceState);
	        setContentView(R.layout.app_common_personal_info__layout);
	        
	        // -- Initialize title Bar--
	     	titleBar = (TitleBar) findViewById(R.id.normal_activity_CV_TB1);
	     	// -- Call the methods to change the underlying widgets--
	     	titleBar.setTitle("PERSONAL INFO");
	     	titleBar.setIcon(R.drawable.icon);
	     	titleBar.showProgressBar();
	        
	        //--Setting Menu.
	        PrepareMenu(ApplicationController.MenuItems,ApplicationController.MenuNameItems, null, null);

	        //--Assembling widgets--
	        name=(TextView) findViewById(R.id.common_Personal_InfoTBX01);
	        name.setText("avon");
	        realName=(TextView) findViewById(R.id.common_Personal_InfoTBX02);
	        realName.setText("avon");
	        pass=(TextView) findViewById(R.id.common_Personal_InfoTBX03);
	        pass.setText("12345");
	        repeatPass=(TextView) findViewById(R.id.common_Personal_InfoTBX04);
	        repeatPass.setText("12345");
	        email=(TextView) findViewById(R.id.common_Personal_InfoTBX05);
	        email.setText("avon@avon");
	        cellphone=(TextView) findViewById(R.id.common_Personal_InfoTBX06);
	        cellphone.setText("15789658");
	        address=(TextView) findViewById(R.id.common_Personal_InfoTBX07);
	        address.setText("whatever");
	        phone =(TextView) findViewById(R.id.common_Personal_InfoTBX08);
	        phone.setText("4589762");
	        
	        ML=(TextView) findViewById(R.id.common_Personal_InfoTBX09);
	        ML.setText("1");
	        LN =(TextView) findViewById(R.id.common_Personal_InfoTBX10);
	        LN.setText("ltda");
	        
	        TypeUserSI=(ImageView) findViewById(R.id.common_Personal_InfoIG02);
	        if ( ApplicationController.TypeUser.ADMIN== ApplicationController.getCurrentUser())
	        	TypeUserSI.setImageResource(R.drawable.ic_launcher_admin_si);
	        else if ( ApplicationController.TypeUser.CLIENT== ApplicationController.getCurrentUser())
	        	TypeUserSI.setImageResource(R.drawable.ic_launcher_client_si);
	        else
	        	TypeUserSI.setImageResource(R.drawable.ic_launcher_member_si);
	        
	        save = (Button)findViewById(R.id.common_Personal_InfoBTN01);
	        save.setOnClickListener(ApplicationController.getInstance());

	 }

}
